from rest_framework import serializers
from django.contrib.auth.models import User
from .models import StudentProfile

class StudentSerializer(serializers.ModelSerializer):
    class Meta:
        model = StudentProfile
        fields = '__all__'

class LoginSerializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = ['username', 'password']

class StudentBaseSerializer(serializers.ModelSerializer):
    class Meta:
        model = StudentProfile
        fields = (
            'student_name', 
            'student_id', 
            'gender', 
            'height', 
            'weight', 
        )

class StudentReportSerializer(serializers.ModelSerializer):
    class Meta:
        model = StudentProfile
        fields = (
            'student_name', 
            'student_id', 
            'classname', 
            'gender', 
        )